package com.game.grid;

import android.app.Activity;
import android.graphics.Canvas;
import android.os.Bundle;
import android.widget.TextView;
import android.view.Window;
import android.view.WindowManager;

public class GridGame extends Activity {
	
	/** Constants */
	
	//game object extends view so this is where we are actually going to do the drawing and such.  Most game features will be under that class.
	private game theGame;
	//private Canvas canvas;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        //forces the window to be full screen
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        //removes the title bar at the top
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        
        theGame = new game(this);
        setContentView(theGame);
        theGame.requestFocus();
    }
    
    @Override
    protected void onPause() {
    	super.onPause();
    	
    	theGame.gamePaused = true;
    }
    
    protected void onResume() {
    	super.onResume();
    	
    	theGame.gamePaused = false;
    }
    
/*    @Override
    protected void onPause() {
    	super.onPause();
    	
    	try {
			theGame.gameTimer.wait();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    }
    
    @Override
    protected void onResume() {
    	super.onResume();
   
		theGame.gameTimer.notify();
    }*/
}